home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / contrib / svgalib / vga.grab_svgalib_mode < prev   
Encoding:
Text File  |  1995-07-01  |  1.6 KB  |  51 lines

  1. #!/bin/sh
  2. #
  3. #
  4. # This is an example application of the getVGAreg tool
  5. #
  6. # This script produces an svgalib-compatible mode line for an ET4000, from the
  7. # current mode. Running this from X will enable you to use EXACTLY the same
  8. # mode from svgalib as from X.
  9. #
  10. # It can be easily adapted for other cards that use the dynamic configuration
  11. # mode of svgalib. 
  12. #
  13. # written by Kris Coryn, adapted for S3 by Koen Gadeyne
  14. #
  15.  
  16. GX=../../getVGAreg
  17. CLOCK=`../../clockprobe`
  18.  
  19. echo "
  20. /* mode -- $1 */
  21. /* Video timing:
  22. $CLOCK */
  23.  
  24. static unsigned char g$1_regs[xx] = { 
  25. \
  26.   `$GX -x CRTC 0`,`$GX -x CRTC 1`,`$GX -x CRTC 2`,`$GX -x CRTC 3`,\
  27. `$GX -x CRTC 4`,`$GX -x CRTC 5`,`$GX -x CRTC 6`,`$GX -x CRTC 7`,\
  28. `$GX -x CRTC 8`,`$GX -x CRTC 9`,`$GX -x CRTC 10`,`$GX -x CRTC 11`,
  29. \
  30.   `$GX -x CRTC 12`,`$GX -x CRTC 13`,`$GX -x CRTC 14`,`$GX -x CRTC 15`,\
  31. `$GX -x CRTC 16`,`$GX -x CRTC 17`,`$GX -x CRTC 18`,`$GX -x CRTC 19`,\
  32. `$GX -x CRTC 20`,`$GX -x CRTC 21`,`$GX -x CRTC 22`,`$GX -x CRTC 23`,
  33. \
  34.   `$GX -x ATRCTL 0`,`$GX -x ATRCTL 1`,`$GX -x ATRCTL 2`,`$GX -x ATRCTL 3`,\
  35. `$GX -x ATRCTL 4`,`$GX -x ATRCTL 5`,`$GX -x ATRCTL 6`,`$GX -x ATRCTL 7`,\
  36. `$GX -x ATRCTL 8`,`$GX -x ATRCTL 9`,`$GX -x ATRCTL 10`,`$GX -x ATRCTL 11`,
  37. \
  38.   `$GX -x ATRCTL 12`,`$GX -x ATRCTL 13`,`$GX -x ATRCTL 14`,`$GX -x ATRCTL 15`,\
  39. `$GX -x ATRCTL 16`,`$GX -x ATRCTL 17`,`$GX -x ATRCTL 18`,`$GX -x ATRCTL 19`,\
  40. `$GX -x ATRCTL 20`,
  41. \
  42.   `$GX -x GRCTL 0`,`$GX -x GRCTL 1`,`$GX -x GRCTL 2`,`$GX -x GRCTL 3`,\
  43. `$GX -x GRCTL 4`,`$GX -x GRCTL 5`,`$GX -x GRCTL 6`,`$GX -x GRCTL 7`,\
  44. `$GX -x GRCTL 8`,
  45. \
  46.   `$GX -x SEQ 0`,`$GX -x SEQ 1`,`$GX -x SEQ 2`,`$GX -x SEQ 3`,`$GX -x SEQ 4`,
  47. \
  48.   `$GX -x MISC`,
  49. \
  50. };
  51. "